package com.dzh.service;

import com.dzh.dao.BillMapper;
import com.dzh.dao.BookMapper;
import com.dzh.pojo.Bill;
import com.dzh.pojo.BillRes;
import com.dzh.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class BillServiceImpl implements BillService{

    private BillMapper billMapper;

    public void setBillMapper(BillMapper billMapper) {
        this.billMapper = billMapper;
    }

    @Override
    public int addBill(Bill bill) {
        return billMapper.addBill(bill);
    }

    @Override
    public int deleteBillById(int billId) {
        return billMapper.deleteBillById(billId);
    }

    @Override
    public int updateBill(Bill bill) {
        return billMapper.updateBill(bill);
    }

    @Override
    public BillRes queryBillById(int billId) {
        return billMapper.queryBillById(billId);
    }

    @Override
    public List<BillRes> queryAllBill() {
        return billMapper.queryAllBill();
    }
}
